% FWEAVE v1.30 (May 15, 1993)

\input fwebmac.sty

\Wbegin[]{article}{1em}{1em}{demo1.cts}{{\&}{\|}{\\}{\\}{\\}{\@}{\.}{\.}}

% --- Beginning of user's limbo section ---


\def\WEB{\.{WEB}} % A TeX macro definition in limbo.




\WN1.  DEMO. This example demonstrates the use of named modules, and some other
features of~\WEB.

\WY\WP\WE:ifndef:$\|N\WIN2{0}$\par
\WP\WMd$\|N\WIN2{0}$\5
$\WO{100}{}$\5
\WC{ If you define this macro from the command line by saying ``\.{-mN=200}'',
that definition will override this one. }\par
\WP\WE:endif:\WY\par
\WY\WP \&{program} \1\\{main}\WIN1{0}\2\1\6
\WX2:Common declarations\X \X\1\2\7
\WX0:Read data\X \X\6
\WX0:Process data\X \X\6
\WX0:Graph results\X \X\2\6
\&{end}\WY\par
\fi % End of module 1

\WM2. Accreting and inserting \WCD{ \&{common}} declarations is an interesting
use of
named modules.

\WY\WP\WF::\WX2:Common declarations\X \X\ \\{common}\WY\par
\WY\WP\4\4\WX2:Common declarations\X \X${}\WS{}$\6
\&{real} \1\|a(\|N\WIN2{1})\2\6
\&{common} \1\|a\2\WY\par
\WA section~3.
\WU section~1.\fi % End of module 2

\WM3. Possibly after many more modules that aren't shown here, we get to code
related to graphics. Here we accrete more information into the common
declarations. The discretized abscissa data is held in the array~\WCD{ \\{xx}};
the
ordinate is in~\WCD{ \\{yy}}.
\WY\WP\4\4\WX2:Common declarations\X \X${}\PQ{}$\6
\&{real} \1\\{xx}(\|N\WIN2{1}), \\{yy}(\|n)\2\5
\Wc{ Example: \WCD{ \&{call} $\\{curve}(\\{xx},\\{yy},\|N\WIN2{1},\WO{1}){}$}}\6
\&{common} \1 ${}{/}\\{graphs}{/}$ \\{xx}, \\{yy}\2\WY\par
\fi % End of module 3

\WN4.  INDEX.
\fi % End of module 4

\input demo1.ndx
\input demo1.mds

\Winfo{"fweave ./demo1 -zdemos.sty -=demo1.tex"}  {"./demo1.web"} {(none)}
 {FORTRAN}

\Wcon
